package com.wjn.basic.thread.threadpool.zdypool;

/**
 * 自定义线程类
 */
public class MyRunnable implements Runnable{
    private String myname;

    public MyRunnable(String myname){
        this.myname=myname;
    }

    public String getMyname() {
        return myname;
    }

    public void setMyname(String myname) {
        this.myname = myname;
    }

    @Override
    public void run() {
        System.out.println("myname is :"+myname);
        try {
            System.out.println(myname+"正在执行5s");
            Thread.sleep(5*1000);

        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
